<div class="row">
    <nav aria-label="Page navigation example" class="col-lg-10 offset-1">
        <span class="pagination-sm" style="float: left">共有{{ pages.total }}条dog|每页{{ pages.page_size }}条</span>
        <ul class="pagination" style="float: right">
            {% if pages.is_prev == 1 %}
                <li class="page-item">
                    <a class="page-link" href="{{ pages.url }}p={{ pages.current - 1 }}" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
            {% endif %}
            {% for idx in pages.range %}
                <li class="page-item {% if pages.current == idx %}active{% endif %}"><a class="page-link"
                                                                                        href="{{ pages.url }}p={{ idx }}">{{ idx }}</a>
                </li>
            {% endfor %}
            {% if pages.is_next == 1 %}
                <li class="page-item">
                    <a class="page-link" href="{{ pages.url }}p={{ pages.current + 1 }}" aria-label="Next">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
            {% endif %}
        </ul>
    </nav>
</div>